﻿# Octo.h
#---------------------------------------------------------------------
:alias nul v1
:alias null  v2
:alias nulll v3
:alias room v4
:alias lastroom v5
:alias items v6
:alias flags v7
:alias checkkey v8
:alias var9 v9
:alias varA vA
:alias loopcount vB
:alias sprY vC
:alias sprX vD
:alias bignumber vE
:alias tempvar vF 


# Octo.macro
#---------------------------------------------------------------------
:macro draw X Y IMAGE HEIGHT {
	sprX := X
	sprY := Y
	i := IMAGE
	sprite sprX sprY HEIGHT
}
:macro drawnum X Y NUM HEIGHT {
	sprX := X
	sprY := Y
	bignumber := NUM
	i := bighex bignumber 
	sprite sprX sprY HEIGHT
}
:macro tileX X HEIGHT {
	sprX := X
	sprite sprX sprY HEIGHT
}
:macro tileY Y HEIGHT {
	sprY := Y
	sprite sprX sprY HEIGHT
}

:macro tileXi X IMAGE {
	sprX := X
	i := IMAGE
	sprite sprX sprY 0
}

:macro tileRoom T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 TA TB TC TD TE TF {
		draw 32 0 T0 0
		tileXi 48 T1
		tileXi 64 T2
		tileXi 80 T3
		draw 32 16 T4 0
		tileXi 48 T5
		tileXi 64 T6
		tileXi 80 T7
		draw 32 32 T8 0
		tileXi 48 T9
		tileXi 64 TA
		tileXi 80 TB
		draw 32 48 TC 0
		tileXi 48 TD
		tileXi 64 TE
		tileXi 80 TF			
}	

:macro roomUpdateCenter T0 T1 T2 T3 {
		draw 48 16 T0 0
		tileXi 64 T1
		draw 48 32 T2 0
		tileXi 64 T3
}


#notes
#---------------------------------------------------------------------
#--: FUN_drawRead #todo Number/Room Event
#--	drawnum 7 51 3 10
#--	drawnum 16 51 4 10
#--return

#main
#---------------------------------------------------------------------
: main
	hires
	clear
	room := 1
	lastroom := 0
	#FUN_draw_UI
	loop
		if room != lastroom begin
			FUN_drawRoom
			lastroom := room
		end
		FUN_drawPlayerMap
		FUN_sync
		
	again

# Functions
#---------------------------------------------------------------------
: FUN_drawBG  #TODO: If space needed, loop these to save space
	draw 0 0 bg-black 0 
	tileY 16 0
	tileY 32 0
	tileY 48 0
	tileX 16 0
	tileY 0 0
  	tileY 16 0
	tileY 32 0
	tileX 96 0
	tileY 0 0
	tileY 16 0
	tileY 48 0
	tileX 112 0
	tileY 16 0
	tileY 32 0
	tileY 0 0
	draw 104 40 bg-mapbase 0
	draw 8 8 bg-logotop 0
	draw 8 24 bg-logobottom 0
	draw 8 43 bg-read 7
	draw 16 43 bg-read2 7


return

: FUN_draw_UI
	FUN_drawBG
	FUN_drawHealth
	FUN_drawItems
	if flags == 1 begin
		draw 106 44 minimap 7
	end
return

: FUN_drawArrows_udlr #todo Avaiable Directions
	draw 109 35 bg-uparrow 4 
	draw 109 57 bg-downarrow 4 
	draw 99 45 bg-leftarrow 6 
	draw 121 45 bg-rightarrow 6
return

: FUN_drawArrows_u #todo Avaiable Directions
	draw 109 35 bg-uparrow 4 
return

: FUN_drawArrows_d #todo Avaiable Directions
	draw 109 57 bg-downarrow 4 
return

: FUN_drawArrows_l #todo Avaiable Directions
	draw 99 45 bg-leftarrow 6 
return

: FUN_drawArrows_r #todo Avaiable Directions
	draw 121 45 bg-rightarrow 6
return


: FUN_drawPlayerMap  #Drawing the full map got cut, at least it gives you a general location.
	checkkey := 3 if checkkey key then room += 1
	checkkey := 2 if checkkey key then room += 255
	if room == 1 begin draw 106 49 bg-dot 1 
		checkkey := 5 if checkkey key then room := 2
		checkkey := 8 if checkkey key then room := 16
		return
	end
	if room == 2 begin draw 106 48 bg-dot 1 
		checkkey := 5 if checkkey key then room := 3
		checkkey := 8 if checkkey key then room := 1
		return
	end
	if room == 3 begin draw 106 47 bg-dot 1 
		if items > 0 begin 
			checkkey := 5 if checkkey key then room := 7
		end
		checkkey := 8 if checkkey key then room := 2
		checkkey := 7 if checkkey key then room := 5
		checkkey := 9 if checkkey key then room := 4
		return
	end
	if room == 4 begin draw 107 47 bg-dot 1 
		checkkey := 7 if checkkey key then room := 3
		checkkey := 9 if checkkey key then room := 5
		return
	end

	if room == 5 begin draw 108 47 bg-dot 1 
		checkkey := 7 if checkkey key then room := 4
		checkkey := 9 if checkkey key then room := 3
		checkkey := 8 if checkkey key then room := 6
		return
	end
	if room == 6 begin draw 108 48 bg-dot 1 
		checkkey := 5 if checkkey key then room := 5
		return
	end
	if room == 7 begin draw 106 46 bg-dot 1 
		checkkey := 5 if checkkey key then room := 8
		checkkey := 8 if checkkey key then room := 3
		return
end
	if room == 8 begin draw 106 45 bg-dot 1 
		checkkey := 8 if checkkey key then room := 7
		checkkey := 9 if checkkey key then room := 9
		return
end
	if room == 9 begin draw 107 45 bg-dot 1
		checkkey := 7 if checkkey key then room := 8
		checkkey := 5 if checkkey key then room := 10
		return

 end
	if room == 10 begin draw 107 44 bg-dot 1 
		checkkey := 8 if checkkey key then room := 9
		checkkey := 9 if checkkey key then room := 11
		return
end
	if room == 11 begin draw 108 44 bg-dot 1 
		checkkey := 7 if checkkey key then room := 10
		checkkey := 9 if checkkey key then room := 12
		return
end
	if room == 12 begin draw 109 44 bg-dot 1 
		checkkey := 8 if checkkey key then room := 13
		checkkey := 7 if checkkey key then room := 11
		return
end
	if room == 13 begin draw 109 45 bg-dot 1 
		checkkey := 5 if checkkey key then room := 12
		checkkey := 8 if checkkey key then room := 14
		return

end
	if room == 14 begin draw 109 46 bg-dot 1 
		checkkey := 5 if checkkey key then room := 13
		if items > 1 begin
			if flags > 0 begin
				checkkey := 7 if checkkey key then room := 15
			end
		end
		return
end
	if room == 15 begin draw 108 46 bg-dot 1 

end
	if room == 16 begin draw 106 47 bg-dot 1 
		checkkey := 5 if checkkey key then room := 1
		return
	end


return

: FUN_drawHealth
	draw 99 8 bg-heart 6
	draw 108 8 bg-heart 6
	draw 117 8 bg-heart 6

return

: FUN_drawItems
	draw 100 18 bg-line 1
	tileX 108 1
	tileX 116 1
	draw 100 31 bg-line 1
	tileX 108 1
	tileX 116 1
	if items > 0 begin
	draw 99 20 bg-item1 10
	end
	if items > 1 begin
	draw 108 20 bg-item1 10
	end
	if flags > 0 begin
	draw 117 20 bg-item1 10
	end
return

: FUN_drawRoom
	clear
	FUN_draw_UI
	if room == 0 begin
	end
	if room == 1 begin
	# -- Print the read numbers
		drawnum 7 51 0 10
		drawnum 16 51 1 10
	# -- Draw map arrows
		FUN_drawArrows_u
	# -- Draw Room
		_draw_room_outside_
	end
	if room == 2 begin
	# -- Print the read numbers
		drawnum 7 51 0 10
		drawnum 16 51 2 10
	# -- Draw map arrows
		FUN_drawArrows_u
		FUN_drawArrows_d
	# -- Draw Room
		_draw_room_default_
		_draw_nextroom_center
		_draw_far_right_door
		_draw_far_left_door
	end
	if room == 3 begin
	# -- Print the read numbers
		#Hacky For Item Use
	# -- Draw map arrows
		FUN_drawArrows_u
		FUN_drawArrows_d
		FUN_drawArrows_l
		FUN_drawArrows_r
	# -- Draw Room
		_draw_room_default_
		_draw_right_door
		_draw_left_door
	if items == 0 begin
		 _draw_lockeddoor_center
		drawnum 7 51 0 10
		drawnum 16 51 3 10
	end
	if items > 0 begin
		_draw_nextroom_center
		drawnum 7 51 1 10
		drawnum 16 51 8 10
	end

	end
	if room == 4 begin
	# -- Print the read numbers
		drawnum 7 51 0 10
		drawnum 16 51 4 10
	# -- Draw Room
		_draw_room_default_
		_draw_right_door
		_draw_left_door
	# -- Draw Arrows
		FUN_drawArrows_l
		FUN_drawArrows_r
	end
	if room == 5 begin
	# -- Print the read numbers
		drawnum 7 51 0 10
		drawnum 16 51 5 10
	# -- Draw Room
		_draw_room_default_
		_draw_right_door
		_draw_left_door
	# -- Draw Arrows
		FUN_drawArrows_l
		FUN_drawArrows_r
		FUN_drawArrows_d
	end
	if room == 6 begin
	# -- Print the read numbers
		# Item Room, see hack below
	# -- Draw Room
		_draw_room_default_
		_draw_nextroom_center
	# -- Draw Arrows
		FUN_drawArrows_u
	if items == 0 begin
		draw 60 48 bg-item1 10
		drawnum 7 51 0 10
		drawnum 16 51 6 10
	end
	if items > 0 begin
		drawnum 7 51 1 10
		drawnum 16 51 7 10
	end
	# -- Set Items
		if items == 0 then items := 1
	end
	if room == 7 begin
	# -- Print the read numbers
		drawnum 7 51 0 10
		drawnum 16 51 7 10
	# -- Draw Room
		_draw_room_default_
		_draw_nextroom_center
		_draw_far_right_door
	# -- Draw Arrows
		FUN_drawArrows_u
		FUN_drawArrows_d
	end
	if room == 8 begin
	# -- Print the read numbers
	if items < 2 begin
		drawnum 7 51 0 10
		drawnum 16 51 8 10
	end
	if items == 2 begin
		_draw_right_door
		drawnum 7 51 2 10
		drawnum 16 51 0 10
		FUN_drawArrows_r
	end
	# -- Draw Room
		_draw_room_default_
		_draw_window_center
	# -- Draw Arrows
		FUN_drawArrows_d
	end
	if room == 9 begin
	# -- Print the read numbers
		drawnum 7 51 0 10
		drawnum 16 51 9 10
	items := 2
	# -- Draw Room
		_draw_room_default_
		_draw_left_door
		_draw_nextroom_center
		_draw_far_right_door
	# -- Draw Arrows
		FUN_drawArrows_u
		FUN_drawArrows_l
	end
	if room == 10 begin
	# -- Print the read numbers
		drawnum 7 51 1 10
		drawnum 16 51 0 10
	# -- Draw Room
		_draw_room_default_
		_draw_right_door
		_draw_endofwall_center
	# -- Draw Arrows
		FUN_drawArrows_d
		FUN_drawArrows_r
	end
	if room == 11 begin
	# -- Print the read numbers
		drawnum 7 51 1 10
		drawnum 16 51 1 10
	# -- Draw Room
		_draw_room_default_
		_draw_right_door
		_draw_left_door
		draw 60 32 hint 15
	# -- Draw Arrows
		FUN_drawArrows_l
		FUN_drawArrows_r
	end
	if room == 12 begin
	# -- Print the read numbers
		drawnum 7 51 1 10
		drawnum 16 51 2 10
	# -- Draw Room
		_draw_room_default_
		_draw_left_door
		_draw_window_center
	# -- Draw Arrows
		FUN_drawArrows_l
		FUN_drawArrows_d
	end
	if room == 13 begin
	# -- Print the read numbers
		drawnum 7 51 1 10
		drawnum 16 51 3 10
	# -- Draw Room
		_draw_room_default_
		_draw_nextroom_center
		_draw_far_left_door
	# -- Draw Arrows
		FUN_drawArrows_u
		FUN_drawArrows_d
	end
	if room == 14 begin
	# -- Print the read numbers
		drawnum 7 51 1 10
		drawnum 16 51 4 10
	# -- Draw Room
		_draw_room_default_
		_draw_nextroom_center
		_draw_left_door
		draw 37 35 lock 7
		draw 37 27 lock 7
		draw 37 43 lock 7
	# -- Draw Arrows
		FUN_drawArrows_u
		FUN_drawArrows_l
	end
	if room == 15 begin
	# -- Print the read numbers
		drawnum 7 51 1 10
		drawnum 16 51 5 10
	# -- Draw Room
	roomUpdateCenter
		grandma3 grandma4
		grandma1 grandma2
	return
	end
	if room == 16 begin
	# -- Print the read numbers
		
	tileRoom 
		t02 tr1 tr2 t02 
		t02 tr3 tr4 t02 
		tr7 tr5 tr6 tr7
		t01 t01 t01 t01 

		FUN_drawArrows_u
	if flags > 0 begin
		drawnum 7 51 1 10
		drawnum 16 51 8 10
	end
	if flags == 0 begin
		drawnum 7 51 1 10
		drawnum 16 51 6 10
		draw 60 52 bg-item1 10
		flags := 1
	end


	end

return


: _draw_room_default_
tileRoom 
	t00 t01 t01 t03
	t02 t02 t02 t02 
	t02 t02 t02 t02 
	t12 t13 t13 t15
return

: _draw_nextroom_center
roomUpdateCenter
	t05 t06
	t09 t10
return

: _draw_endofwall_center
roomUpdateCenter
	tlineleft tlineright
	tlineleft tlineright
return

: _draw_window_center
roomUpdateCenter
	t14 t14
	t14 t14
return

: _draw_lockeddoor_center
roomUpdateCenter
	dul dur
	dbl dbr
return

: _draw_right_door
	draw 84 44 trightdoor1 15
	draw 84 29 trightdoor2 15
	draw 84 14 trightdoor3 15
return

: _draw_left_door
	draw 36 44 tleftdoor1 15
	draw 36 29 tleftdoor2 15
	draw 36 14 tleftdoor3 15
return

: _draw_far_right_door
	draw 70 30 tfrightdoor 10
return

: _draw_far_left_door
	draw 56 30 tfleftdoor 10
return


: _draw_room_outside_
tileRoom 
	t04 t04 t04 t04 
	t04 t16 t16 t04 
	t04 t16 t16 t04 
	t01 t01 t01 t01 
return

: FUN_sync
	loop
		tempvar := delay
		if tempvar != 0 then
	again
	tempvar := 10
	delay := tempvar 
return

# Media
#---------------------------------------------------------------------
: bg-black : t13
0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF	 
: bg-mapbase
0x73 0xCE 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 
0x7F 0xFE 0x7F 0xFE 0xFF 0xFF 0xFF 0xFF 
0xFF 0xFF 0xFF 0xFF 0x7F 0xFE 0x7F 0xFE 
0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x73 0xCE 
: bg-logotop
0xCA 0x97 0xAA 0xD5 0xAA 0xF2 0xAA 0xB5 
0xC4 0x97 0x00 0x00 0xFF 0xFF 0x30 0x0C 
0xFF 0xFF 0xE0 0x07 0xC0 0x03 0x80 0x01 
0x8C 0x31 0x8C 0x31 0x80 0x01 0x80 0x01 
: bg-logobottom
0x81 0x81 0x82 0x41 0x82 0x41 0xC1 0x83 
0xE0 0x07 0xD0 0x0B 0xD5 0xAB 0xD5 0xAB 
0x95 0xA9 0xA5 0xA5 0xC9 0x93 0x49 0x92 
0x51 0x8A 0x31 0x8C 0x1B 0xD8 0x07 0xE0 
: bg-read
0xEE 0xA8 0xCC 0xA8 0xAE 0x00 0xFF 
: bg-read2
0xEC 0xAA 0xEA 0xAA 0xAC 0x00 0xFE 
: bg-uparrow
0x30 0x48 0x84 0x30 
: bg-downarrow
0x30 0x84 0x48 0x30 
: bg-rightarrow
0x40 0x20 0x90 0x90 0x20 0x40
: bg-leftarrow
0x20 0x40 0x90 0x90 0x40 0x20 
: bg-dot
0x80 
: bg-line
0xFF
: bg-heart
0x6C 0xFE 0xFE 0x7C 0x38 0x10 
: bg-emptyheart
0x6C 0x92 0x82 0x44 0x28 0x10
: bg-item1
0xFE 0x82 0xBA 0x44 0x28 0x28 0x24 0x28 
0x24 0x38 
: t00 # Wall Up Left
0x80 0x00 0x7F 0xFF 0x3F 0xFF 0x1F 0xFF 
0x0F 0xFF 0x07 0xFF 0x03 0xFF 0x01 0xFF 
0x00 0xFF 0x00 0x7F 0x00 0x3F 0x00 0x1F 
0x00 0x0F 0x00 0x07 0x00 0x03 0x00 0x01 
: t01 # Wall top, black white top border
0x00 0x00 0xff 0xff 0xff 0xff 0xff 0xff 
0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 
0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 
0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 
: t02 # Solid Black
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
: t03 # Wall up right
0x00 0x01 0xFF 0xFE 0xFF 0xFC 0xFF 0xF8 
0xFF 0xF0 0xFF 0xE0 0xFF 0xC0 0xFF 0x80 
0xFF 0x00 0xFE 0x00 0xFC 0x00 0xF8 0x00 
0xF0 0x00 0xE0 0x00 0xC0 0x00 0x80 0x00 
: t04 # Brick
0xFF 0xFF 0x00 0x01 0xFF 0xFF 0x04 0x00 
0xFF 0xFF 0x00 0x02 0x7F 0xFF 0x80 0x00 
0xFF 0xFF 0x10 0x00 0xFF 0xFF 0x00 0x10 
0xFF 0xFF 0x00 0x80 0xFF 0xFD 0x00 0x02 
: t05 # Inner Door Up Left
0xFF 0xFF 0xC0 0x00 0x80 0x00 0x9F 0xFF 
0x98 0x00 0x97 0xFF 0x97 0xFF 0x95 0xFF 
0x94 0xFF 0x94 0x7F 0x94 0x3F 0x94 0x1F 
0x94 0x18 0x94 0x17 0x94 0x14 0x94 0x14 
: t06 # Inner Door Up Right
0xFF 0xFF 0x00 0x03 0x00 0x01 0xFF 0xF9 
0x00 0x19 0xFF 0xE9 0xFF 0xE9 0xFF 0xA9 
0xFF 0x29 0xFE 0x29 0xFC 0x29 0xF8 0x29 
0x18 0x29 0xE8 0x29 0x28 0x29 0x28 0x29 

: t09 # Inner Door Bottom left
0x94 0x14 0x94 0x14 0x94 0x14 0x94 0x14 
0x94 0x1F 0x94 0x1B 0x94 0x37 0x94 0x6F 
0x94 0xDF 0x95 0xBF 0x97 0x7F 0x96 0xFF 
0x95 0xFF 0x97 0xFF 0x97 0xFF 0x9F 0xFF  
: t10 # Inner Door Bottm right
0x28 0x29 0x28 0x29 0x28 0x29 0x28 0x29 
0xF8 0x29 0xD8 0x29 0xEC 0x29 0xF6 0x29 
0xFB 0x29 0xFD 0xA9 0xFE 0xE9 0xFF 0x69 
0xFF 0xA9 0xFF 0xE9 0xFF 0xE9 0xFF 0xF9 

: t12 #-- Carpet Left
0x00 0x01 0x00 0x03 0x00 0x06 0x00 0x0D 
0x00 0x1B 0x00 0x37 0x00 0x6F 0x00 0xDF 
0x01 0xBF 0x03 0x7F 0x06 0xFF 0x0D 0xFF 
0x1B 0xFF 0x37 0xFF 0x6F 0xFF 0xDF 0xFF 

: tlineleft
0x80 0x00 0x80 0x00 0x80 0x00 0x80 0x00 
0x80 0x00 0x80 0x00 0x80 0x00 0x80 0x00 
0x80 0x00 0x80 0x00 0x80 0x00 0x80 0x00 
0x80 0x00 0x80 0x00 0x80 0x00 0x80 0x00 

: tlineright
0x00 0x01 0x00 0x01 0x00 0x01 0x00 0x01 
0x00 0x01 0x00 0x01 0x00 0x01 0x00 0x01 
0x00 0x01 0x00 0x01 0x00 0x01 0x00 0x01 
0x00 0x01 0x00 0x01 0x00 0x01 0x00 0x01 



: t14 #-- Window
0xFF 0xFF 0x80 0x09 0xC0 0x05 0xA0 0x01 
0x91 0x01 0x88 0x81 0xC0 0x41 0xA0 0x21 
0x80 0x01 0x80 0x01 0x80 0x41 0x80 0x21 
0xC0 0x11 0xA0 0x89 0x80 0x45 0xFF 0xFF 
: t15
0x80 0x00 0xC0 0x00 0x60 0x00 0xB0 0x00 
0xD8 0x00 0xEC 0x00 0xF6 0x00 0xFB 0x00 
0xFD 0x80 0xFE 0xC0 0xFF 0x60 0xFF 0xB0 
0xFF 0xD8 0xFF 0xEC 0xFF 0xF6 0xFF 0xFB 

: t16 #-- doors
0xFF 0xFF 0x80 0x01 0x9F 0xFD 0xBF 0xF9 
0xB0 0x05 0xB0 0x05 0xB0 0x05 0xB0 0x05 
0xB0 0x05 0xB0 0x05 0xB0 0x05 0xB0 0x05 
0xB0 0x05 0xAF 0xFD 0x80 0x01 0xFF 0xFF 


: trightdoor1
0xBF 0xBF 0xBF 0xBF 0xBF 0xBF 0xBF 0xBF 
0x5F 0x2F 0x17 0x0B 0x05 0x03 0x01 

: trightdoor2
0xBF 0xBF 0xBF 0xBF 0xBF 0xBF 0xBF 0xBF 
0xBF 0xBF 0xBF 0xBF 0xBF 0xBF 0xBF 

: trightdoor3
0x00 0x00 0x00 0x00 0x00 0x38 0x7C 0x7E 
0xBE 0xBF 0xBF 0xBF 0xBF 0xBF 0xBF 

: tleftdoor1
0xFD 0xFD 0xFD 0xFD 0xFD 0xFD 0xFD 0xFD 
0xFA 0xF4 0xE8 0xD0 0xA0 0xC0 0x80 

: tleftdoor2
0xFD 0xFD 0xFD 0xFD 0xFD 0xFD 0xFD 0xFD 
0xFD 0xFD 0xFD 0xFD 0xFD 0xFD 0xFD 

: tleftdoor3
0x00 0x00 0x00 0x00 0x00 0x1C 0x3E 0x7E 
0x7D 0xFD 0xFD 0xFD 0xFD 0xFD 0xFD 

: tfrightdoor
0x80 0xC0 0xC0 0xC0 0xC0 0xC0 0xC0 0xC0 
0xC0 0x40 

: tfleftdoor
0x40 0xC0 0xC0 0xC0 0xC0 0xC0 0xC0 0xC0 
0xC0 0x80 

: dul
0xFF 0xFF 0xC0 0x00 0x80 0x00 0x9F 0xFF 
0x98 0x01 0x90 0x01 0x90 0x01 0x90 0x01 
0x90 0x01 0x90 0x01 0x90 0x01 0x90 0x01 
0x90 0x01 0x90 0x01 0x90 0x01 0x90 0x01 

: dur
0xFF 0xFF 0x00 0x03 0x00 0x01 0xFF 0xF9 
0x80 0x19 0x80 0x09 0x80 0x09 0x80 0x09 
0x80 0x09 0x80 0x09 0x80 0x09 0x80 0x09 
0x80 0x09 0x80 0x09 0x80 0x09 0x80 0x09 

: dbl
0x90 0x19 0x90 0x25 0x90 0x25 0x90 0x19 
0x90 0x01 0x90 0x01 0x90 0x01 0x90 0x01 
0x90 0x01 0x90 0x01 0x90 0x01 0x90 0x01 
0x90 0x01 0x90 0x01 0x98 0x01 0x9F 0xFF 


: dbr
0x98 0x09 0xA4 0x09 0xA4 0x09 0x98 0x09 
0x80 0x09 0x80 0x09 0x80 0x09 0x80 0x09 
0x80 0x09 0x80 0x09 0x80 0x09 0x80 0x09 
0x80 0x09 0x80 0x09 0x80 0x19 0xFF 0xF9

: tr1
0x00 0x00 0x03 0x7D 0x1C 0x82 0x20 0xC4 
0x11 0x39 0x0E 0x47 0x10 0x89 0x13 0x34 
0x1C 0xCB 0x20 0x84 0x51 0x65 0x4E 0x1A 
0x54 0xE5 0x55 0x04 0x26 0x8B 0x29 0x71 

: tr2
0x00 0x00 0xF0 0x00 0x8F 0x80 0x20 0xC0 
0xD1 0x38 0x2E 0x46 0xA0 0x88 0x43 0x34 
0x9C 0xCA 0x20 0x84 0xD1 0x64 0x0E 0x1A 
0x58 0x64 0xE5 0x04 0x06 0x88 0xA9 0x74 

: tr3
0x34 0x8C 0x43 0x73 0x5C 0x82 0x20 0xC4 
0x11 0x39 0x2E 0x47 0x20 0x89 0x43 0x34 
0x5C 0xCB 0x20 0x84 0x11 0x65 0x0E 0x1A 
0x18 0xE5 0x05 0x04 0x06 0x8B 0x01 0x71 

: tr4
0xB4 0x8C 0x43 0x73 0x5C 0x82 0xA0 0xC5 
0x91 0x39 0xAE 0x46 0xA0 0x89 0x43 0x35 
0x5C 0xCA 0x20 0x85 0xB1 0x65 0x4E 0x1A 
0x58 0xE4 0xC5 0x04 0x46 0x88 0x39 0x70 


: tr5
0x00 0x08 0x00 0x0C 0x00 0x0C 0x00 0x0A 
0x00 0x0B 0x00 0x0B 0x00 0x0B 0x00 0x0B 
0x00 0x09 0x00 0x0A 0x00 0x0A 0x00 0x0A 
0x00 0x4A 0x10 0x8E 0x0A 0x8C 0x07 0x0C 


: tr6
0x10 0x00 0x90 0x00 0x50 0x00 0x50 0x00 
0x30 0x00 0x30 0x00 0x30 0x00 0x30 0x00 
0x50 0x00 0x50 0x00 0xD0 0x00 0x90 0x00 
0x10 0x00 0x90 0x00 0xD5 0x04 0x52 0x24 

: tr7
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x54 0x89 0x25 0x14 

: minimap
0x70 0xD0 0xB0 0xE0 0xA0 0x80 0x80 0x00 

: lock
0x70 0xFC 0xFC 0x70 0x20 0x70 0xFC 

: grandma1
0x80 0x00 0x80 0x00 0x80 0x00 0x40 0x00 
0x44 0x04 0x3B 0x1B 0x10 0xE0 0x1E 0x00 
0x31 0xAC 0x31 0x27 0x28 0xF8 0x18 0x00 
0x04 0x10 0x03 0x0F 0x00 0xE0 0x00 0x1F 


: grandma2
0x00 0x01 0x00 0x01 0x00 0x01 0x00 0x02 
0x20 0x22 0xD8 0xDC 0x07 0x08 0x00 0x78 
0x35 0x8C 0xE4 0x8C 0x1F 0x14 0x00 0x18 
0x08 0x20 0xF0 0xC0 0x07 0x00 0xF8 0x00 

: grandma3
0x00 0x00 0x00 0x00 0x00 0x1F 0x00 0x60 
0x00 0x80 0x01 0x00 0x1D 0x00 0x22 0x00 
0x42 0x00 0x40 0x00 0x40 0x00 0x30 0x00 
0x40 0x00 0x40 0x00 0x80 0x00 0x80 0x00 

: grandma4
0x00 0x00 0x00 0x00 0xF8 0x00 0x06 0x00 
0x01 0x00 0x00 0x80 0x00 0xB8 0x00 0x44 
0x00 0x42 0x00 0x02 0x00 0x02 0x00 0x0C 
0x00 0x02 0x00 0x02 0x00 0x01 0x00 0x01 

: hint
0x74 0x54 0x74 0x00 0xFF 0x54 0xFF 0xD7 
0xFF 0x00 0x18 0x18 0x7E 0x3C 0x18 